<%@page contentType="text/html; charset=utf-8" language="java"%>
<%@page import="org.apache.commons.lang.StringUtils"%>
<%@page import="com.lanhai.util.DateUtil"%>
<%@page import="java.util.Date"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<script type="text/javascript">
<!--

	var secondString =  "<%=(DateUtil.formatDate(new Date(), "yyyy-MM-dd HH:mm:ss")) %>";
    var secondServer   =   new   Date(Date.parse(secondString.replace(/-/g,   "/")));  
    var secondInt = parseInt(secondServer.getTime()/1000);
    var secondClient = parseInt(new Date().getTime()/1000);
    var secondSub = secondInt - secondClient; //两端时间秒差
    
    function meizzTime() 
	{ 
		var mei = new Date(); 
		mei.setTime(mei.getTime() + secondSub*1000); //得到一个新的时间 
		var h = (mei.getHours() > 9) ? mei.getHours() : "0" + mei.getHours(); 
		var m = (mei.getMinutes() > 9) ? mei.getMinutes() : "0" + mei.getMinutes(); 
		var s = (mei.getSeconds() > 9) ? mei.getSeconds() : "0" + mei.getSeconds(); 
		document.getElementById("time").innerHTML =mei.getFullYear() + "-" + (mei.getMonth()+1) + "-" + mei.getDate() + " " + h + ":" + m + ":" +s; 
		setTimeout("meizzTime()", 1000); 
	} 
	
	$(function() {
		$('.pages_menu li:has(ul)')
          .click(function(event){
            if (this == event.target) {
              $(this).css('list-style-image',
                (!$(this).children().is(':hidden')) ?
                  'url(plus.gif)' : 'url(minus.gif)');
              $(this).children().toggle('slow');
            }
            return;
          })
          .css({cursor:'pointer',
                'list-style-image':'url(plus.gif)'})
          .children().hide();
        $('.pages_menu li:not(:has(ul))').css({
          cursor: 'default',
          'list-style-image':'none'
        });
        var id = document.body.id;
		var liid = '#gprs_' + id;
		$('.pages_menu li a').removeClass();
		$(liid + ' a').addClass('onthis');
		
		$(liid).parent().parent().children().show();
        $(liid).parent().parent().css('list-style-image', 'url(minus.gif)');
        
        $('#jiaofei').fadeOut(8000);
        
        meizzTime();
	});
//-->
</script>
<div style="float: left;">
<div class="pages_menu">
	<div id="time" style="text-align: center;"></div>
	<ul>
		<li class="menu_grade1">设备信息
			<ul>
				<li class="menu_grade2" id="gprs_userdevice"><a href="../user/userDevice.action">设备状态</a></li>
				<li class="menu_grade2" id="gprs_deviceadd"><a href="../user/addDevice.action">设备添加</a></li>
			</ul>
		</li>
		<li class="menu_grade1">信息查询
			<ul>
				<li class="menu_grade2" id="gprs_endquery"><a href="../user/endQuery.action">缴费日期查询</a></li>
				<li class="menu_grade2" id="gprs_refuelquery"><a href="../user/refuelQuery.action">加油信息查询</a></li>
				<li class="menu_grade2" id="gprs_refuelquery"><a href="../user/refuelQueryDiagram.action">加油信息曲线图</a></li>
				<li class="menu_grade2" id="gprs_infoquery"><a href="../user/infoQuery.action">异常信息查询</a></li>
			</ul>
		</li>
		<li class="menu_grade1">密码修改
			<ul>
				<li class="menu_grade2" id="gprs_mmxg"><a href="../user/password.action">密码修改</a></li>
			</ul>
		</li>
		<li class="menu_grade1">其他管理
			<ul>
				<s:if test="#session.suser.susers != null && !#session.suser.susers.isEmpty()">
					<li class="menu_grade2" id="gprs_subuser"><a href="../user/subUser.action">子用户查询</a></li>
				</s:if>
				<li class="menu_grade2" id="gprs_logout"><a href="../logout.jsp">退出系统</a></li>
			</ul>
		</li>
	</ul>
	<% String jiaofei = (String)request.getSession().getAttribute("jiaofei");
		if(StringUtils.isNotBlank(jiaofei)) {
	 %>
	 <div id="jiaofei">
	 	<div id="content" lang="english">
	 		<%=jiaofei.replaceAll("\\n", "<br>") %>
	 	</div>
	 </div>
	 
	 <% } %>
</div>
</div>